The process consisted of 1 online coding round , 3 tech interview rounds and 1 HR interview round....
An array in C/C++ or be it in any programming language is a collection of similar data items stored at contiguous memory locations and elements that can be accessed randomly using indices of an array. They can be used to store the collection of primitive data types such as int, float, double, char, etc of any particular type. To add to it, an array in C/C++ can store derived data types such as structures, pointers, etc. Given below is the picture representation of an array....
Given an array of elements, the task is to insert these elements in level order and construct a tree....
Given a stack of integers. The task is to design a special stack such that the maximum element can be found in O(1) time and O(1) extra space....
Given a binary array arr[] of size N and a 2D array Q[][] containing K queries of the following two types:...
Given an array arr[] of N integers, the task is to perform the following two queries:...
Given an array arr[], the task is to find the count of sub-arrays with GCD equal to 1.Examples:...
Given an array of size N, initially consists of zeroes only. The task is to apply the given operation q times and find the number of different numbers in the array except for zeroes. Operation Format: update(l, r, x):: update a[i] = x for all (l <= i <= r)....
Given a binary array arr[] and q queries of following types:...
Given an unsorted array, trim the array such that twice of minimum is greater than the maximum in the trimmed array. Elements should be removed from either end of the array. The number of removals should be minimum....
Given an array ‘arr’ all the numbers of which are initialized to ‘0’ then the array can be updated at any time in the following way: All the elements of any sub-array from the array can be flipped i.e. ‘1’ => ‘0’ or ‘0’ => ‘1’. The task is to find the number of 1s from the array for any incoming query [l, r] where ‘l’ and ‘r’ are valid indices in the given array....
Given an array of N numbers and Q queries, each query consists of L and R. We need to write a program that prints the number of occurrence of the smallest element in the range L-R....